package Offer.q05_replaceSpace;

public class Solution_1 {
    public static void main(String[] args) {

    }

    public String replaceSpace(String s) {
        StringBuilder res = new StringBuilder();
        for (int i = 0; i < s.length(); i++) {
            res.append((s.charAt(i)) == ' ' ? "%20" : s.charAt(i));
        }
        return res.toString();
    }
}
